﻿using AnesSystem.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AnesSystem;
using AnesSystem.Services;

namespace AnesSystem.ViewModels
{
    public class PacuNoShowSignCtrlViewModel : BaseViewModel<PacuNoShowSignCtrlViewModel>
    {
        #region Variables
        private ObservableCollection<ConfigVitalSignsModel> _notAutoShowSignsList;
        private ConfigVitalSignsModel _selectSigns;
        #endregion


        #region Constructor
        public PacuNoShowSignCtrlViewModel()
        {
            _notAutoShowSignsList = new ObservableCollection<ConfigVitalSignsModel>();
        }




        #endregion


        #region Properties

        public ObservableCollection<ConfigVitalSignsModel> NotAutoShowSignsList
        {
            get
            {
                return _notAutoShowSignsList;
            }

            set
            {
                _notAutoShowSignsList = value;
            }
        }

        public ConfigVitalSignsModel SelectSigns
        {
            get
            {
                return _selectSigns;
            }

            set
            {
                _selectSigns = value;
            }
        }


        #endregion


        #region 依赖属性


        #endregion


        #region Event


        #endregion


        #region PrivateMethods





        #endregion


        #region Public/ProtectedMethods
        public void ChangeNoShowSelectSign(ConfigVitalSignsModel configVitalSignsModel)
        {
            _selectSigns = configVitalSignsModel;
        }

        public void RemoveNotAutoShowListByCode(string code)
        {
            if (string.IsNullOrEmpty(code))
            {
                return;
            }
            int index = -1;
            for (int i = 0; i < NotAutoShowSignsList.Count; i++)
            {
                if (code.Equals(NotAutoShowSignsList[i].code))
                {
                    index = i;
                }
            }
            if (index != -1)
            {
                NotAutoShowSignsList.RemoveAt(index);
            }
        }
        #endregion


        #region EventHandlers


        #endregion
    }
}
